import { BasicResponseData, PageResponseData } from '@/api/type'

export interface SPUImage {
  id?: number
  spuId?: number
  imgName: string
  imgUrl: string
}

export interface SPUSaleAttrValue {
  id?: number
  baseSaleAttrId: number
  spuId?: number
  saleAttrName: string
  saleAttrValueName: string
  isChecked?: string
}

export interface SPUSaleAttr {
  id?: number
  saleAttrName: string
  spuId: number
  baseSaleAttrId: number
  spuSaleAttrValueList: SPUSaleAttrValue[]
}

export interface SPU {
  id?: number
  spuName: string
  description: string
  category3Id: number
  tmId: number
  spuSaleAttrList: SPUSaleAttr[]
  spuImageList: SPUImage[]
}

export interface PageData extends PageResponseData<SPU> {
  searchCount: boolean
}

export interface SPUResponseData extends BasicResponseData {
  data: PageData
}
